//
//  kaochaTableViewCell.m
//  gangquOASystem
//
//  Created by michael on 2018/7/27.
//  Copyright © 2018年 czd. All rights reserved.
//

#import "kaochaTableViewCell.h"

@implementation kaochaTableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
    self.selectionStyle = UITableViewCellSelectionStyleNone;
self.bgView  = [[UIView alloc]init];

_label = [[UILabel alloc]init];
_label.frame = CGRectZero;
  _label.textColor = [UIColor colorWithHexString:@"484848"];
_label.text = @"时间";
    _label.font = [UIFont systemFontOfSize:14];
[self.bgView addSubview:_label];
 _timebutton = [zhucebutton buttonWithType:UIButtonTypeCustom];

    [_timebutton setTitle:@"选择时间" forState:UIControlStateNormal];
    [self.bgView addSubview:_timebutton];

      _textfield2= [[zhucetextfield alloc]init];
                    _textfield2.delegate = self;

[self.bgView addSubview:_textfield2];


_label2 = [[UILabel alloc]init];
_label2.frame = CGRectZero;
  _label2.textColor = [UIColor colorWithHexString:@"484848"];
_label2.text = @"启程地";
    _label2.font = [UIFont systemFontOfSize:14];

[self.bgView addSubview:_label2];
      _textfield2 = [[zhucetextfield alloc]init];
                    _textfield2.delegate = self;

[self.bgView addSubview:_textfield2];

_label3 = [[UILabel alloc]init];
_label3.frame = CGRectZero;
  _label3.textColor = [UIColor colorWithHexString:@"484848"];
_label3.text = @"到达地";
    _label3.font = [UIFont systemFontOfSize:14];

[self.bgView addSubview:_label3];
      _textfield3 = [[zhucetextfield alloc]init];
                    _textfield3.delegate = self;

[self.bgView addSubview:_textfield3];


}
    self.selectionStyle = UITableViewCellSelectionStyleNone;

return self;

}
- (void)setSeltag:(NSInteger)seltag{
_seltag = seltag;
_textfield2.tag = 200+_seltag;
_textfield3.tag = 300+_seltag;
      _timebutton.tag = _seltag;

}
- (void)layoutSubviews{
[super layoutSubviews];
 self.bgView.frame =  CGRectMake(10, 5, KScreenWidth - 20, 180+10);
    self.bgView.backgroundColor = [UIColor whiteColor];
    //给bgView边框设置阴影
//    self.bgView.layer.shadowOffset = CGSizeMake(1,1);
//    self.bgView.layer.shadowOpacity = 0.3;
        self. bgView.layer.borderWidth = 1;

      self.  bgView.layer.borderColor = [[UIColor colorWithHexString:@"aeaeae"] CGColor];
        self.bgView.layer.cornerRadius = 5;

    [self.contentView addSubview:self.bgView];
_label.frame =  CGRectMake(10, 0,self.bgView.width-20, 20);
_timebutton.frame =  CGRectMake(10, _label.bottom,self.bgView.width-20, 40);
_label2.frame =  CGRectMake(10, _timebutton.bottom,self.bgView.width-20, 20);
_textfield2.frame =  CGRectMake(10, _label2.bottom,self.bgView.width-20, 40);
_label3.frame =  CGRectMake(10, _textfield2.bottom,self.bgView.width-20, 20);
_textfield3.frame =  CGRectMake(10, _label3.bottom,self.bgView.width-20, 40);

}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
